package com.oc.mba.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * OcSolutions entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "oc_solutions", catalog = "openmba")
public class OcSolutions implements java.io.Serializable {

	// Fields

	private Integer id;
	private OcTopic ocTopic;
	private String content;

	// Constructors

	/** default constructor */
	public OcSolutions() {
	}

	/** minimal constructor */
	public OcSolutions(OcTopic ocTopics) {
		this.ocTopic = ocTopics;
	}

	/** full constructor */
	public OcSolutions(OcTopic ocTopics, String content) {
		this.ocTopic = ocTopics;
		this.content = content;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "topic_id", nullable = false)
	public OcTopic getOcTopic() {
		return this.ocTopic;
	}

	public void setOcTopic(OcTopic ocTopic) {
		this.ocTopic = ocTopic;
	}

	@Column(name = "content", length = 65535)
	public String getContent() {
		return this.content;
	}

	public void setContent(String content) {
		this.content = content;
	}

}